package cn.uexpo.lhz.common.oldUtils;

import cn.uexpo.lhz.common.oldBase.BOException;
import cn.uexpo.lhz.sms.Message;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.uexpo.lhz.biz.DictionaryBiz;
@Service
public class MsgBiz {
	@Autowired
	protected DictionaryBiz dictionaryBiz;

/*
*
	 * 轮候证项目是否发短信
	 * @param telphone
	 * @param verifyCode
	 * @throws BOException

*/

	public void lhzSendMsg(String telphone, String verifyCode) throws BOException {
		String sysCode = "lhz_sys_params";// 系统参数编码
		String lhz_msg_open = "lhz_msg_open";// 是否发短信
		String msgFlag = dictionaryBiz.selectValueBy(sysCode, lhz_msg_open);
		if (StringUtils.isNotBlank(msgFlag) && msgFlag.equals("1")) {
			Message.sendMsg(telphone, verifyCode);// 调用发短信方法
		}

	}
/**
	 * 人证项目是否发短信
	 * @param telphone
	 * @param verifyCode
	 * @throws BOException*/


	public void rzSendMsg(String telphone, String verifyCode) throws BOException {
		String sysCode = "rz_sys_params";// 系统参数编码
		String lhz_msg_open = "rz_msg_open";// 是否发短信
		String msgFlag = dictionaryBiz.selectValueBy(sysCode, lhz_msg_open);
		if (StringUtils.isNotBlank(msgFlag) && msgFlag.equals("1")) {
			Message.sendMsg(telphone, verifyCode);// 调用发短信方法
		}
		
	}
/**
	 * 车证项目是否发短信
	 * @param telphone
	 * @param verifyCode
	 * @throws BOException*/


	public void czSendMsg(String telphone, String verifyCode) throws BOException {
		String sysCode = "cz_sys_params";// 系统参数编码
		String lhz_msg_open = "cz_msg_open";// 是否发短信
		String msgFlag = dictionaryBiz.selectValueBy(sysCode, lhz_msg_open);
		if (StringUtils.isNotBlank(msgFlag) && msgFlag.equals("1")) {
			Message.sendMsg(telphone, verifyCode);// 调用发短信方法
		}
		
	}

}
